/*
 * @Author: your name
 * @Date: 2022-02-18 20:50:33
 * @LastEditTime: 2022-02-18 21:16:38
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \ts\命名空间\ts\components.ts
 */

// 命名空间，此时只会生成一个component全局变量
namespace Component {
    export class Header { // 到出的模块才能在外部调用,相当于Component.Header = Header,具体转换城的js代码可以看康
        constructor() {
            let div = document.createElement('div')
            div.innerText = '我是头部'
            div.style.cssText = 'margin:20px;color:red;'
            document.body.appendChild(div)
            
        }
    }
    export class Main {
        constructor() {
            let div = document.createElement('div')
            div.innerText = '我是中间主要区域'
            div.style.cssText = 'margin:20px;color:blue;'
            document.body.appendChild(div)
        }
    }
    export class Footer {
        constructor() {
            new inner()
            let div = document.createElement('div')
            div.innerText = '我是头部'
            div.style.cssText = 'margin:20px;color:yellow;'
            document.body.appendChild(div)
        }
    }
     class inner {
        constructor() {
            let div = document.createElement('div')
            div.innerText = '我没有导出'
            div.style.cssText = 'margin:20px;color:yellow;'
            document.body.appendChild(div)
        }
    }

}